<?php
session_start();
require '../nette/Nette/loader.php';
require '../db.php';
require '../localization/lang.php';
require '../core/core.sanitizer.php';
require '../core/core.security.php';
require '../core/core.time.php';
$login=new core_security;
if ($login->checklogin()=="OK") {

if ($_POST['action']=="to") {
$time=new core_time;
echo $time->computetime($_POST['from'],"00:00",$_POST['duration'],"to");
	}
if ($_POST['action']=="duration") {
$time=new core_time;
echo $time->computetime($_POST['from'],$_POST['to'],"00:00","duration");
	}	
	
}
?>